

import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/stm/swstinputpassengerworkother/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/stm/swstinputpassengerworkother',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/stm/swstinputpassengerworkother/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/stm/swstinputpassengerworkother/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/stm/swstinputpassengerworkother',
    method: 'put',
    data: obj
  })
}

export function exportExcel(query){
  return request({
    url: '/stm/swstinputpassengerworkother/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

export function submit(obj){
  return request({
    url: '/stm/swstinputpassengerworkother/submit',
    method: 'post',
    data: obj
  })
}

export function batchDelete(obj){
  return request({
    url: '/stm/swstinputpassengerworkother/batchDelete',
    method: 'post',
    data: obj
  })
}

export function getInputPassengerWorkOther(param) {
  return request({
    url: "/stm/swstinputpassengerworkother/getInputPassengerWorkOther",
    method: "post",
    params: param
  });
}
//查询产生原因对应金额是否需要负数
export function getHappenCause(param) {
  return request({
    url: "/support/swpmworkotherhappencause/getHappenCause?happenCause="+param,
    method: "get"
  });
}

//查看其他相关数据录入历史记录
export function queryPastRecords(param){
  return request({
    url: '/stm/swstinputpassengerworkother/getLogById/'+param.id,
    method: 'get'
  })
}
